package com.zero.clinic.service.impl;

import com.zero.clinic.mapper.RecipeMapper;
import com.zero.clinic.pojo.Recipe;
import com.zero.clinic.pojo.RecipeExample;
import com.zero.clinic.service.RecipeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RecipeServiceImpl implements RecipeService {

    @Resource
    private RecipeMapper recipeMapper;

    @Override
    public List<Recipe> selectByExample(RecipeExample example) {
        return recipeMapper.selectByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Long recipeId) {
        return recipeMapper.deleteByPrimaryKey(recipeId);
    }

    @Override
    public int insert(Recipe record) {
        return recipeMapper.insert(record);
    }

    @Override
    public int insertSelective(Recipe record) {
        return recipeMapper.insertSelective(record);
    }

    @Override
    public Recipe selectByPrimaryKey(Long recipeId) {
        return recipeMapper.selectByPrimaryKey(recipeId);
    }

    @Override
    public int updateByPrimaryKeySelective(Recipe record) {
        return recipeMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int deleteByIds(String[] recipeIds) {
        return recipeMapper.deleteByIds(recipeIds);
    }
}
